package org.qs.webservice.dao.user;



import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.qs.webservice.domain.UsBookRecent;
import org.springframework.stereotype.Component;

@Component
public interface UsBookRecentMapper {
	/**
	 * 添加最近阅读
	 * @param usBookRecent
	 * @return
	 */
	int addBookRecent(UsBookRecent usBookRecent);
	/**
	 * 获取最近阅读
	 * @param pages
	 * @param contents
	 * @param user_id
	 * @return
	 */
	List<UsBookRecent> list(@Param("pages")int pages,@Param("contents")int contents,@Param("user_id")Long user_id,@Param("orderType")String order);
	int listNum(@Param("user_id")Long user_id);
	
	UsBookRecent getBookRecentByBookId(@Param("book_id")int book_id,@Param("user_id")Long user_id);
}
